﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Empleados.aspx.cs" Inherits="Bukstor.Admin.UI.Empleados"
    MasterPageFile="~/MasterAdmin.Master" Theme="SkinAdmin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Empleados</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="Panel1" runat="server" Style="margin-left: 187px" Width="646px" GroupingText="Ingrese nombre y contraseña">
        <div>
            <div style="float: left; height: 52px; width: 224px">
                <div style="height: 26px" align="right">
                    <asp:Label ID="lblUsername" runat="server" Text="Username"></asp:Label></div>
                <div style="height: 26px" align="right">
                    <asp:Label ID="lblPassword" runat="server" Text="Password"></asp:Label></div>
            </div>
            <div style="float: right; height: 52px; width: 408px">
                <div align="left" style="height: 26px">
                    <asp:TextBox ID="txtUsername" runat="server"></asp:TextBox><asp:RequiredFieldValidator
                        ID="RequiredFieldValidator1" runat="server" ErrorMessage="" Text="* Falta ingresar nombre de usuario"
                        ControlToValidate="txtUsername" ValidationGroup="Empleados"></asp:RequiredFieldValidator></div>
                <div align="left" style="height: 26px">
                    <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox><asp:RequiredFieldValidator
                        ID="RequiredFieldValidator2" runat="server" ErrorMessage="" Text="* Falta ingresar la contraseña"
                        ControlToValidate="txtPassword" ValidationGroup="Empleados"></asp:RequiredFieldValidator></div>
            </div>
        </div>
    </asp:Panel>
    <br />
    <div align="center">
        <asp:Button ID="btnAlta" runat="server" Text="ALTA" ValidationGroup="Empleados" OnClick="btnAlta_Click" /></div>
    <br />
    <div align="center">
        <asp:Button ID="btnAnular" runat="server" Text="ANULAR LA CONTRASEÑA" OnClick="btnAnular_Click" /></div>
    <br />
    <asp:GridView ID="gvEmpleados" runat="server" BackColor="White" HorizontalAlign="Center"
        BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" DataSourceID="EntityDataSource2"
        AutoGenerateColumns="False" DataKeyNames="id" AllowSorting="True">
        <Columns>
            <asp:CommandField ShowEditButton="True" ShowSelectButton="True" 
                ButtonType="Image" CancelImageUrl="~/Imagenes/icoCancel.jpeg" 
                EditImageUrl="~/Imagenes/icoEditar.gif" HeaderText="seleccionar" 
                SelectImageUrl="~/Imagenes/icoOk.jpeg" 
                UpdateImageUrl="~/Imagenes/icoOk.jpeg" UpdateText="Actualizar" />
            <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" SortExpression="id" />
            <asp:BoundField DataField="username" HeaderText="username" SortExpression="username" />
            <asp:BoundField DataField="password" HeaderText="password" SortExpression="password"
                ReadOnly="False" Visible="False" />
        </Columns>
        <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
        <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
        <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
        <RowStyle BackColor="White" ForeColor="#003399" />
        <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
        <SortedAscendingCellStyle BackColor="#EDF6F6" />
        <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
        <SortedDescendingCellStyle BackColor="#D6DFDF" />
        <SortedDescendingHeaderStyle BackColor="#002876" />
    </asp:GridView>
    <br />
    <asp:EntityDataSource ID="EntityDataSource2" runat="server" ConnectionString="name=BukstorBDEntities"
        DefaultContainerName="BukstorBDEntities" EntitySetName="Empleados" EnableFlattening="False"
        EnableInsert="True" EnableUpdate="True">
    </asp:EntityDataSource>
</asp:Content>
